SuperStrict

Local x% = 32
Local y% = 24
Local siz% = x*y
Local bytes% = 4*siz

Local membefore:Int = GCMemAlloced()

Print "siz = "+siz+" gotta alloc "+(bytes/1024) + "k"
Local data:Float Ptr = Float Ptr( MemAlloc(bytes) )

Local memafter:Int = GCMemAlloced()
Print "mem before" + membefore
Print "mem after " + memafter
Print "diff : "+(memafter-membefore)


For Local i%=0 Until siz
	data[i] = i
Next

For Local i%=0 Until x
For Local j%=0 Until y
	Local idx% = i*y+j
	Print idx+" "+ data[idx]
Next
Next

MemClear(data,bytes)

Print "######################################################################"
Print "                                MEM CLEAR"
Print "######################################################################"

For Local i%=0 Until x
For Local j%=0 Until y
	Local idx% = i*y+j
	Print idx+" "+ data[idx]
Next
Next

